<template>
  <div class="w-full">
    <CommonHead />
    <SkipHydration>
      <div class="mt-mt-s lg:mt-mt-l bg-main-bg">
        <!-- 商品图 -->
        <IntroduceBanner :data="introduceDetail" />
        <IntroduceContent :data="introduceDetail" />
      </div>
      <NewHomeFoot />
    </SkipHydration>
  </div>
</template>
<script setup lang="ts">
import IntroduceBanner from '~/components/introduce/IntroduceBanner.vue'
import IntroduceContent from '~/components/introduce/IntroduceContent.vue'
import CommonHead from '~/components/basis/CommonHead.vue'
import NewHomeFoot from '~/components/home/NewHomeFoot.vue'
import { useIntroduceStore } from '~/store/introduce'
import { useGameSeo } from '~/composables/useTdk'

definePageMeta({
  layout: 'plain',
})

const routeQuery = useRoute().params

const introduceStore = useIntroduceStore()
// 服务端渲染的数据
await useAsyncData(
  async () => {
    await introduceStore.initIntroduceDetail(routeQuery.urlName as string)
    return 1
  },
  { default: () => [] as any },
)
const { introduceDetail } = storeToRefs(introduceStore)
useGameSeo(unref(introduceDetail))
</script>

<style lang="scss"></style>
